global d_user "Your Directory" //Set the directory :)
set more off

********************************************************************************
// Evaluation of Delivering Breakfast After the Bell and Academic Performance //
// among Third-Grade Children: An Application of The Synthetic Control Method //
//                         Journal of School Health                           //
//                  Cuadros-Menaca, Thomsen, and Nayga (2022)                 //
********************************************************************************

//Table 1. Descriptive statistics

use "$d_user\Data.dta", clear

gen treatment = BAB==1 & year>=2015
egen school_bab = max(treatment), by (School) 

xtset School year
xtsum ZMath ZELA Boy Minority Ecodis total Bus Class_size_ SchoolPovertyIndex Teacherratio  Teachers_Certified if year<2015
xtsum ZMath ZELA Boy Minority Ecodis total Bus Class_size_ SchoolPovertyIndex Teacherratio  Teachers_Certified if year<2015 & school_bab==1
xtsum ZMath ZELA Boy Minority Ecodis total Bus Class_size_ SchoolPovertyIndex Teacherratio  Teachers_Certified if year<2015 & school_bab==0

xtsum ZMath ZELA Boy Minority Ecodis total Bus Class_size_ SchoolPovertyIndex Teacherratio  Teachers_Certified if year>=2015
xtsum ZMath ZELA Boy Minority Ecodis total Bus Class_size_ SchoolPovertyIndex Teacherratio  Teachers_Certified if year>=2015 & school_bab==1
xtsum ZMath ZELA Boy Minority Ecodis total Bus Class_size_ SchoolPovertyIndex Teacherratio  Teachers_Certified if year>=2015 & school_bab==0
 